<template>
  <div>
      <div style="background-color: #ececec; padding: 10px;" class="my-card">
      <a-row :gutter="16">
        <a-col :span="8">
          <a-card title="总资源数" :bordered="false">
            <p style="font-size:20px">{{ cjcount+dtcount }}</p>
          </a-card>
        </a-col>
        <a-col :span="8">
          <a-card title="场景" :bordered="false">
            <p style="font-size:20px">{{ cjcount }}</p>
          </a-card>
        </a-col>
        <a-col :span="8">
          <a-card title="地图" :bordered="false">
            <p style="font-size:20px">{{ dtcount }}</p>
          </a-card>
        </a-col>
      </a-row>
    </div>
  </div>
</template>

<script>
import Axios from 'axios'

export default {
    name:"myheadcard",
    data(){
        return {
            cjcount:'',
            dtcount:'',
            count: '',
        }
    },
    beforeMount(){
    // 获取数量
      let dtfw =this.axios.get('/sys/resource/list',
      {
        params:{
          sourceTypeInt:1
        }
      }).then((res)=>{
        // console.log(res.result.total)  //2
        this.cjcount = res.result.total
        // this.count += this.cjcount
      });
      let cj =this.axios.get('/sys/resource/list',
      {
        params:{
          sourceTypeInt:2
        }
      }).then((res)=>{
        // console.log(res.result.total)  //132
        this.dtcount = res.result.total
      })
    },


}
</script>

<style lang="scss" scoped>
.my-card {
  text-align: center;
}
</style>>


